package com.cl.ks.repository;

import com.cl.ks.entity.KsFilterResult;
import com.cl.mvc.repository.BaseRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface KsFilterResultRepository extends BaseRepository<KsFilterResult> {
    @Modifying
    @Transactional
    @Query(nativeQuery = true,value = "delete from ks_filter_result where filter_id=:id and is_available is null ")
    void deleteByIdAndIsAvailableIsNull(Integer id);


}
